from lib.mysql.db import DB


class UserChapter:

    table_name = "user_chapter"
    primary_id = "ChapterId"

    @classmethod
    def table(cls, alias: str = "") -> DB:
        alias_str = ""
        if alias != "":
            alias_str = f" as {alias}"
        return DB.table(name = cls.table_name + alias_str)
    